<ng-content></ng-content>
<ng-template
  #overlay="cdkConnectedOverlay"
  cdkConnectedOverlay
  [cdkConnectedOverlayOrigin]="overlayOrigin"
  [cdkConnectedOverlayHasBackdrop]="_hasBackdrop"
  (backdropClick)="hide()"
  (detach)="hide()"
  (positionChange)="onPositionChange($event)"
  [cdkConnectedOverlayPositions]="_positions"
  [cdkConnectedOverlayOpen]="visible$ | async">
  <div class="ant-popover" [ngClass]="_classMap" [ngStyle]="nzOverlayStyle" [@fadeAnimation]="''+(visible$ | async)"
    (@fadeAnimation.done)="_afterVisibilityAnimation($event)">
    <div class="ant-popover-content">
      <div class="ant-popover-arrow"></div>
      <div class="ant-popover-inner">
        <div>
          <div class="ant-popover-inner-content">
            <div class="ant-popover-message">
              <ng-container *ngIf="isTitleString; else titleTemplate">
                <i class="anticon anticon-exclamation-circle"></i>
                <div class="ant-popover-message-title">{{ nzTitle }}</div>
              </ng-container>
              <ng-template #titleTemplate>
                <ng-template [ngTemplateOutlet]="nzTitle"></ng-template>
              </ng-template>
            </div>
            <div class="ant-popover-buttons">
              <button nz-button [nzSize]="'small'" (click)="onCancel()">
                <ng-container *ngIf="nzCancelText">{{ nzCancelText }}</ng-container>
                <ng-container *ngIf="!nzCancelText">{{ 'Modal.cancelText' | nzI18n }}</ng-container>
              </button>
              <button nz-button [nzSize]="'small'" [nzType]="nzOkType" (click)="onConfirm()">
                <ng-container *ngIf="nzOkText">{{ nzOkText }}</ng-container>
                <ng-container *ngIf="!nzOkText">{{ 'Modal.okText' | nzI18n }}</ng-container>
              </button>
            </div>

          </div>
        </div>
      </div>
    </div>
  </div>
</ng-template>